@extends('admin/layout/index')


@section('content')
	@if (count($errors) > 0)
	    <div class="mws-form-message error">
	        <ul>
	            @foreach ($errors->all() as $error)
	                <li>{{ $error }}</li>
	            @endforeach
	        </ul>
	    </div>
	@endif
 	<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>用户修改</span>
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" action="/admin/user/update" method="post" enctype="multipart/form-data">
    		{{ csrf_field() }}
    		<div class="mws-form-inline">
            <div class="mws-form-row">
                        <label class="mws-form-label" style="margin-top:90px">修改头像</label>
                        <div class="mws-form-item" style="width:180px">
                            <div style="width:180px;height:180px;border:1px solid red;"><img src="/uploads/images/userpic/{{ $data['userpic']}}"></div><br>
                            <input type="file" name="userpic">
                        </div>
                    </div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">账号</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="username" value="{{ $data['username']}}">
    				</div>
    			</div>
                <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">昵称</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="nickname" value="{{ $data['nickname']}}">
                    </div>
                </div>
                <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">电话</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="tel" value="{{ $data['tel']}}">
                    </div>
                </div>
      			<div class="mws-form-row">
    				<label class="mws-form-label">邮箱</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="email" value="{{ $data['email'] }}">
    				</div>
    			</div>
                <div class="mws-form-row">
                    <label class="mws-form-label">金钱</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="money" value="{{ $data['money'] }}">
                    </div>
                </div>
                <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">积分</label>
                    <div class="mws-form-item">
                        <input class="small" type="text" name="scores" value="{{ $data['scores']}}">
                    </div>
                </div>
    	
    			<div class="mws-form-row">
    				<label class="mws-form-label">等级</label>
    				<div class="mws-form-item clearfix">
    					<ul class="mws-form-list inline">
    						<li><input type="radio" name="level" value="1" @if($data['level'] == '1') checked @endif> <label>普通用户</label></li>
    						<li><input type="radio" name="level" value="2" @if($data['level'] == '2') checked @endif> <label>VIP会员</label></li>  						
                            <li><input type="radio" name="level" value="3" @if($data['level'] == '3') checked @endif> <label>管理员</label></li>                           
    					</ul>
    				</div>
    			</div>
                <div class="mws-form-row">
                    <label class="mws-form-label">状态</label>
                    <div class="mws-form-item clearfix">
                        <ul class="mws-form-list inline">
                            <li><input type="radio" name="status" value="1" @if($data['status'] == '1') checked @endif> <label>未激活</label></li>
                            <li><input type="radio" name="status" value="2" @if($data['status'] == '2') checked @endif> <label>激活</label></li>                         
                            <input type="hidden" name="id" value="{{ $data['id'] }}">
                        </ul>
                    </div>
                </div>
    		</div>
    		<div class="mws-button-row">
    			<input value="修改" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>  
@endsection

